package com.andy.jyaml;

import java.io.File;
import java.io.FileNotFoundException;

import org.ho.yaml.Yaml;

import com.andy.fastjson.User;

public class JyamlTest {

	/**
	 * @param args
	 * @throws FileNotFoundException 
	 */
	public static void main(String[] args) throws FileNotFoundException {
//		dumpTest();
		load();
	}
	
	public static void dumpTest() throws FileNotFoundException{
		User user = new User("12", "andy", 23);
		Yaml.dump(user, new File("object.yml"));
	}
	
	public static void load() throws FileNotFoundException{
		Object object = Yaml.load(new File("object.yml"));
		System.out.println(object);
	}

}
